<html>
<head>
    <title>easyserver index</title>
    <style type="text/css">

        table {
            border-collapse: collapse;
            margin: 0 auto;
            text-align: center;
        }

        table td, table th {
            border: 1px solid #cad9ea;
            color: #666;
            height: 30px;

        }

        table thead th {
            background-color: #CCE8EB;
            width: 100px;
            word-break: break-word;
        }

        table tr:nth-child(odd) {
            background: #fff;
        }

        table tr:nth-child(even) {
            background: #F5FAFA;
        }
    </style>

</head>
<script>

    function saveItem(id) {
        window.open("add?id=" + id)
    }


</script>
<body>
<a href="/easyserver/config" style="font-size: large">My config</a>
<table width="90%" class="table">
    <tr>
        <th>
            no
        </th>
        <th>
            time
        </th>
        <th>
            method
        </th>
        <th>
            url
        </th>
        <th >
            response
        </th>
        <th>

        </th>

    </tr>
{{range $i, $v := .}}
    <tr>
        <td>
        {{$i}}
        </td>
        <td>
        {{formatTime $v.Time}}
        </td>
        <td>
        {{$v.Method}}
        </td>
        <td>
        {{$v.UrlPath}}
        </td>
        <td >
        {{subLongText $v.ResponseText}}
        </td>
        <td>
            <img width="20" height="20" src="static/img/edit.png" onclick="saveItem({{$v.Id}})">
        </td>

    </tr>
{{end}}
</table>
</form>


</body>
</html>